home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / DDJ0992.ARJ / DFLAT.DOC < prev    next >
Text File  |  1992-08-13  |  51KB  |  1,320 lines

  1. Window Classes:
  2.  
  3. Window classes define the behavior of windows. Each class has its own
  4. unique reaction to messages. Classes derive from other classes.
  5.  
  6.     NORMAL       base window for all window classes
  7.     APPLICATION  application window. has the menu 
  8.                  (derived from NORMAL)
  9.     TEXTBOX      textbox. base window for listbox, editbox, etc.
  10.                  (derived from NORMAL)
  11.     LISTBOX      listbox. base window for menubar
  12.                  (derived from TEXTBOX)
  13.     PICTUREBOX   picturebox. a text box onto which you can draw lines
  14.                  (derived from TEXTBOX)
  15.     EDITBOX      editbox
  16.                  (derived from TEXTBOX)
  17.     MENUBAR      the application's menu bar
  18.                  (derived from NORMAL)
  19.     POPDOWNMENU  popdown menu
  20.                  (derived from LISTBOX)
  21.     BUTTON       command button in a dialog box
  22.                  (derived from TEXTBOX)
  23.     SPINBUTTON   spin button in a dialog box
  24.                  (derived from LISTBOX)
  25.     COMBOBOX     combination editbox/listbox
  26.          (derived from EDITBOX)
  27.     DIALOG       dialog box. parent to editbox, button, listbox, etc.
  28.                  (derived from NORMAL)
  29.     ERRORBOX     for displaying an error message
  30.                  (derived from DIALOG)
  31.     MESSAGEBOX   for displaying a message
  32.                  (derived from DIALOG)
  33.     HELPBOX      help window
  34.                  (derived from DIALOG)
  35.     TEXT         static text on a dialog box
  36.                  (derived from TEXTBOX)
  37.     RADIOBUTTON  radio button on a dialog box
  38.                  (derived from TEXTBOX)
  39.     CHECKBOX     check box on a dialog box
  40.                  (derived from TEXTBOX)
  41.     STATUSBAR    status bar at the bottom of application window
  42.                  (derived from TEXTBOX)
  43.  
  44.                D-Flat Window Class Tree
  45.     ┌─────────────────────────────────────────────┐
  46.     │                                             │
  47.     │      NORMAL                                 │
  48.     │        │                                    │
  49.     │        ├── APPLICATION                      │
  50.     │        │                                    │
  51.     │        ├── MENUBAR                          │
  52.     │        │                                    │
  53.     │        ├── TEXTBOX                          │
  54.     │        │      │                             │
  55.     │        │      ├── LISTBOX                   │
  56.     │        │      │      │                      │
  57.     │        │      │      ├──── POPDOWNMENU      │
  58.     │        │      │      │                      │
  59.     │        │      │      └──── SPINBUTTON       │
  60.     │        │      │                             │
  61.     │        │      ├── EDITBOX                   │
  62.     │        │      │      │                      │
  63.     │        │      │      └──── COMBOBOX         │
  64.     │        │      │                             │
  65.     │        │      ├── PICTUREBOX                │
  66.     │        │      │                             │
  67.     │        │      ├── STATUSBAR                 │
  68.     │        │      │                             │
  69.     │        │      ├── TEXT                      │
  70.     │        │      │                             │
  71.     │        │      ├── BUTTON                    │
  72.     │        │      │                             │
  73.     │        │      ├── RADIOBUTTON               │
  74.     │        │      │                             │
  75.     │        │      └── CHECKBOX                  │
  76.     │        │                                    │
  77.     │        └── DIALOG                           │
  78.     │              │                              │
  79.     │              ├── ERRORBOX                   │
  80.     │              │                              │
  81.     │              ├── MESSAGEBOX                 │
  82.     │              │                              │
  83.     │              └── HELPBOX                    │
  84.     │                                             │
  85.     └─────────────────────────────────────────────┘
  86.  
  87.  
  88. Window Attributes:
  89.  
  90. Every window has an attribute word that defines some of its
  91. appearance and behavior. The following values are bitwise flags that
  92. OR together to make a window's attributes.
  93.  
  94. You can establish default attributes for a window's class, add
  95. additional attributes when you create the window, and use the
  96. AddAttribute, ClearAttribute, and TestAttribute macros to change and
  97. test a window's attributes.
  98.  
  99.     SHADOW       has a shadow
  100.     MOVEABLE     can move the window with mouse or cursor
  101.     SIZEABLE     can resize the window with mouse or cursor
  102.     HASMENUBAR   has a menubar (an application window)
  103.     VSCROLLBAR   has a vertical scroll bar
  104.     HSCROLLBAR   has a horizontal scroll bar
  105.     VISIBLE      is visible
  106.     SAVESELF     saves its own video memory
  107.     TITLEBAR     has a title bar 
  108.     CONTROLBOX   has a control box and control menu
  109.     MINMAXBOX    has a min/max box 
  110.     NOCLIP       is not clipped to its parent's borders
  111.     READONLY     is a readonly textbox
  112.     MULTILINE    is a multiline editbox or listbox
  113.     HASBORDER    has a border
  114.     HASSTATUSBAR has a statusbar (application window only)
  115.  
  116. Messages:
  117.  
  118. A D-Flat program is message-driven. You initiate message processing
  119. with the init_messages function, create a window with the
  120. CreateWindow function, and go into the message dispatching loop with
  121. the dispatch_message function. 
  122.  
  123. A window can have a window-processing function. When the user causes
  124. events to occur by pressing keys and using the mouse, D-Flat sends
  125. messages to the window's function. That function can send messages to
  126. itself and other windows with the SendMessage and PostMessage
  127. functions.
  128.  
  129. Windows are declared as members of a class. Every class has a default
  130. window-processing function. If you do not provide one for an instance
  131. of a window class, the default one receives messages for the window.
  132. Your custom window-processing function--if one exists--should chain to
  133. the default window-processing function for the blass by calling the
  134. DefaultWndProc function.
  135.  
  136. There are five things a window-processing function can do with a
  137. message:
  138.   - ignore it and let the D-Flat default processing occur.
  139.   - suppress it by returning without chaining to the default
  140.     window-processing function for the window class.
  141.   - chain to the default window-processing function and then do some
  142.     additional processing.
  143.   - do some preliminary processing and then chain to the default
  144.     window-processing function.
  145.   - do all the processing of the message and then return without 
  146.     chaining to the default window-processing function for the 
  147.     window class.
  148.  
  149. Following are the messages that an application program would use.
  150. There are other messages, but they are used by D-Flat only.
  151.  
  152. Process Communication Messages  
  153.  
  154. START                  start message processing (not used now)
  155.   Sent:    
  156.   P1:      
  157.   P2:      
  158.   Returns: 
  159.  
  160. STOP                   stop message processing        
  161.   Sent:    by application window to NULL to stop message 
  162.            dispatch loop
  163.   P1:      
  164.   P2:      
  165.   Returns: 
  166.  
  167. COMMAND                send a command to a window
  168.   Sent:    to send command
  169.   P1:      command code (commands.h)
  170.   P2:      additional data (command-dependent)
  171.            If the command code is a menu selection, P2 is the
  172.            position of the selection on the menu (1,2,...)
  173.            If the command code is a dialog box control, P2 is
  174.            ENTERFOCUS when the command gets the focus, LEAVEFOCUS
  175.            when the command loses the focus, and 0 when the user
  176.            executes the control's command, e.g. presses a button.
  177.   Returns: Nothing if sent by PostCommand
  178.            Command-dependent value if sent by SendCommand
  179.  
  180.  
  181. Window Management Messages  
  182.  
  183. CREATE_WINDOW          create a window                
  184.   Sent:    by DFLAT to new window after window is created
  185.   P1:      
  186.   P2:      
  187.   Returns: 
  188.  
  189. SHOW_WINDOW            show a window                  
  190.   Sent:    by the app to the window to display the window
  191.   P1:      
  192.   P2:      
  193.   Returns: 
  194.  
  195. HIDE_WINDOW            hide a window                  
  196.   Sent:    by the app to the window to hide the window
  197.   P1:      
  198.   P2:      
  199.   Returns: 
  200.  
  201. CLOSE_WINDOW           delete a window                
  202.   Sent:    by the app to destroy a window
  203.   P1:      
  204.   P2:      
  205.   Returns: 
  206.  
  207. SETFOCUS               set and clear the focus        
  208.   Sent:    by D-Flat or the app to set or release the focus
  209.   P1:      true = set, false = release
  210.   P2:      
  211.   Returns: 
  212.  
  213. PAINT                  paint the window's data space  
  214.   Sent:    to paint the client area of a window
  215.   P1:      address of RECT relative to window (0/0 = upper left) 
  216.            to paint or 0 to paint entire client area
  217.   P2:      True to make non-focus window paint without clipping
  218.   Returns: 
  219.  
  220. BORDER                 paint the window's border      
  221.   Sent:    to paint a window's border
  222.   P1:      address of RECT relative to window (0/0 = upper left) 
  223.            to paint or 0 to paint entire border
  224.   P2:      
  225.   Returns: FALSE to suppress D-Flat title display 
  226.            (e.g. the window displays its own border)
  227.  
  228. TITLE                  display the window's title     
  229.   Sent:    by D-Flat when it is about to display a window's title
  230.   P1:      address of RECT relative to window (0/0 = upper left) 
  231.            to paint or 0 to paint entire title
  232.   P2:      
  233.   Returns: FALSE to suppress D-Flat title display 
  234.            (e.g. the window displays its own title)
  235.  
  236. MOVE                   move the window                
  237.   Sent:    to move a window
  238.   P1:      new left coordinate
  239.   P2:      new upper coordinate
  240.   Returns: 
  241.  
  242. SIZE                   change the window's size       
  243.   Sent:    to resize a window
  244.   P1:      new right coordinate
  245.   P2:      new lower coordinate
  246.   Returns: 
  247.  
  248. MAXIMIZE               maximize the window            
  249.   Sent:    to maximize a window within its parent's client area
  250.   P1:      
  251.   P2:      
  252.   Returns: 
  253.  
  254. MINIMIZE               minimize the window            
  255.   Sent:    to minimize a window to an icon 
  256.   P1:      
  257.   P2:      
  258.   Returns: 
  259.  
  260. RESTORE                restore the window             
  261.   Sent:    to restore a window to its position and size prior to the
  262.            maximize or minimize operation
  263.   P1:      
  264.   P2:      
  265.   Returns: 
  266.  
  267. INSIDE_WINDOW          test x/y inside a window       
  268.   Sent:    to test to see if coordinates are inside a window
  269.   P1:      x
  270.   P2:      y
  271.   Returns: true or false
  272.  
  273.  
  274. Clock Messages  
  275.  
  276. CLOCKTICK              the clock ticked               
  277.   Sent:    every second to a window that has captured the clock
  278.   P1:      segment of time display string
  279.   P2:      offset of time display string
  280.   Returns: 
  281.  
  282. CAPTURE_CLOCK          capture clock into a window    
  283.   Sent:    to capture the clock
  284.   P1:      
  285.   P2:      
  286.   Returns: 
  287.  
  288. RELEASE_CLOCK          release clock to the system    
  289.   Sent:    to release the captured clock
  290.   P1:      
  291.   P2:      
  292.   Returns: 
  293.  
  294.  
  295. Keyboard and Screen Messages  
  296.  
  297. KEYBOARD               key was pressed                
  298.   Sent:    when key is pressed. sent to the window that has the focus 
  299.   P1:      keystroke
  300.   P2:      shift key mask
  301.   Returns: 
  302.  
  303. CAPTURE_KEYBOARD       capture keyboard into a window 
  304.   Sent:    by window to itself to capture the keyboard 
  305.            regardless of focus
  306.   P1:      
  307.   P2:      
  308.   Returns: 
  309.  
  310. RELEASE_KEYBOARD       release keyboard to system     
  311.   Sent:    by window to itelf to release the captured keyboard
  312.   P1:      
  313.   P2:      
  314.   Returns: 
  315.  
  316. KEYBOARD_CURSOR        position the keyboard cursor   
  317.   Sent:    to position the keyboard cursor
  318.   P1:      x (if sent by window, 0 = left client area)
  319.   P2:      y (if sent by window, 0 = top client area)
  320.            if sent with NULL, x/y are relative to the screen
  321.   Returns: 
  322.  
  323. CURRENT_KEYBOARD_CURSOR    read the cursor position
  324.   Sent:    to retrieve the cursor position
  325.   P1:      x (relative to the screen)
  326.   P2:      y (relative to the screen)
  327.   Returns: 
  328.  
  329. HIDE_CURSOR            hide the keyboard cursor       
  330.   Sent:    to hide the keyboard cursor
  331.   P1:      
  332.   P2:      
  333.   Returns: 
  334.  
  335. SHOW_CURSOR            display the keyboard cursor    
  336.   Sent:    to display the keyboard cursor
  337.   P1:      
  338.   P2:      
  339.   Returns: 
  340.  
  341. SAVE_CURSOR            save the cursor's configuration
  342.   Sent:    to save the keyboard cursor's current configuration 
  343.   P1:      
  344.   P2:      
  345.   Returns: 
  346.  
  347. RESTORE_CURSOR         restore the saved cursor       
  348.   Sent:    to restore a keyboard cursor's saved configuration 
  349.   P1:      
  350.   P2:      
  351.   Returns: 
  352.  
  353. SHIFT_CHANGED          the shift status changed       
  354.   Sent:    to in-focus window when the user presses or 
  355.            releases shift, alt, or ctrl key
  356.   P1:      BIOS shift key mask
  357.   P2:      
  358.   Returns: 
  359.  
  360. WAITKEYBOARD            wait for key release
  361.   Sent:    to wait for a keypress release
  362.   P1:
  363.   P2:      
  364.   Returns: 
  365.  
  366.  
  367. Mouse Messages  
  368.  
  369. RESET_MOUSE            reset the mouse
  370.   Sent:    to reset the mouse to the current screen configuration
  371.   P1:
  372.   P2:      
  373.   Returns: 
  374.  
  375. MOUSE_TRAVEL        set the mouse's travel
  376.   Sent:    to limit the mouse travel to a screen rectangle
  377.   P1:      address of a RECT
  378.   P2:      
  379.   Returns: 
  380.  
  381. MOUSE_INSTALLED        test for mouse installed       
  382.   Sent:    to see if the mouse is installed
  383.   P1:      
  384.   P2:      
  385.   Returns: true or false
  386.  
  387. RIGHT_BUTTON           right button pressed           
  388.   Sent:    to window when the user presses the right button
  389.            (sent only when mouse cursor is within the window
  390.             or the window has captured the mouse)
  391.   P1:      x
  392.   P2:      y
  393.   Returns: 
  394.  
  395. LEFT_BUTTON            left button pressed            
  396.   Sent:    to window when the user presses the left button
  397.            (sent only when mouse cursor is within the window
  398.             or the window has captured the mouse)
  399.   P1:      x
  400.   P2:      y
  401.   Returns: 
  402.  
  403. DOUBLE_CLICK           left button doubleclicked    
  404.   Sent:    to window when the user double-clicks the left button
  405.            (sent only when mouse cursor is within the window
  406.             or the window has captured the mouse)
  407.            (a LEFT_BUTTON message will have preceded this one)
  408.   P1:      x
  409.   P2:      y
  410.   Returns: 
  411.  
  412. MOUSE_MOVED            mouse changed position         
  413.   Sent:    to window when the mouse has moved
  414.            (sent only when mouse cursor is within the window
  415.             or the window has captured the mouse)
  416.   P1:      x
  417.   P2:      y
  418.   Returns: 
  419.  
  420. BUTTON_RELEASED        mouse button released          
  421.   Sent:    to window when user releases mouse button
  422.            (sent only when mouse cursor is within the window
  423.             or the window has captured the mouse)
  424.   P1:      x
  425.   P2:      y
  426.   Returns: 
  427.  
  428. CURRENT_MOUSE_CURSOR   get mouse position             
  429.   Sent:    to determine the current mouse position
  430.   P1:      address of x
  431.   P2:      address of y
  432.   Returns: mouse coordinates in x and y. If no mouse is installed,
  433.            returns -1 in x and y.
  434.  
  435. MOUSE_CURSOR           set mouse position             
  436.   Sent:    to set the current mouse position
  437.   P1:      x
  438.   P2:      y
  439.   Returns: 
  440.  
  441. SHOW_MOUSE             make mouse cursor visible      
  442.   Sent:    to display the mouse cursor
  443.   P1:      
  444.   P2:      
  445.   Returns: 
  446.  
  447. HIDE_MOUSE             hide mouse cursor              
  448.   Sent:    to hide the mouse cursor
  449.   P1:      
  450.   P2:      
  451.   Returns: 
  452.  
  453. WAITMOUSE              wait until button released     
  454.   Sent:    to wait until the user releases the mouse button
  455.   P1:      
  456.   P2:      
  457.   Returns: 
  458.  
  459. TESTMOUSE              test any mouse button pressed  
  460.   Sent:    to see if either mouse button is pressed
  461.   P1:      
  462.   P2:      
  463.   Returns: true or false
  464.  
  465. CAPTURE_MOUSE          capture mouse into a window    
  466.   Sent:    by/to a window to capture all mouse activity 
  467.            regardless of whether it occurs inside this window
  468.   P1:      
  469.   P2:      
  470.   Returns: 
  471.  
  472. RELEASE_MOUSE          release the mouse to system    
  473.   Sent:    release a captured mouse
  474.   P1:      
  475.   P2:      
  476.   Returns: 
  477.  
  478.  
  479. Text Box Messages  
  480.  
  481. ADDTEXT                add text to the text box       
  482.   Sent:    to append a line of text to the text box
  483.   P1:      address of null-terminated string without \n
  484.            (textbox makes its own copy. string can go out of scope.)
  485.   P2:      
  486.   Returns: 
  487.  
  488. DELETETEXT         delete line of text from the text box       
  489.   Sent:    to append a line of text to the text box
  490.   P1:      line number relative to zero
  491.   P2:      
  492.   Returns: 
  493.  
  494. INSERTTEXT           insert line of text into the text box       
  495.   Sent:    to insert a line of text into the text box
  496.   P1:      address of null-terminated string without \n
  497.   P2:      line number relative to zero that will follow new line.
  498.   Returns: 
  499.  
  500. CLEARTEXT              clear the text box             
  501.   Sent:    clear all text from the text box
  502.   P1:      
  503.   P2:      
  504.   Returns: 
  505.  
  506. SETTEXT                set text buffer contents
  507.   Sent:    To set text buffer to caller's text.
  508.   P1:      address of text buffer
  509.            (lines are terminated by \n without \0)
  510.            (textbox makes its own copy. string can go out of scope.)
  511.   P2:      length of text buffer
  512.   Returns: 
  513.  
  514. SCROLL                 vertical scroll of text box    
  515.   Sent:    to scroll a text window vertically one line
  516.   P1:      true = scroll up, false = scroll down
  517.   P2:
  518.   Returns: 
  519.  
  520. HORIZSCROLL            horizontal scroll of text box 
  521.   Sent:    to scroll a text window horizontally one column
  522.   P1:      true = scroll left, false = scroll right
  523.   P2:
  524.   Returns: 
  525.  
  526. SCROLLPAGE             vertical scroll of text box 1 page
  527.   Sent:    to scroll a text window vertically one page
  528.   P1:      true = scroll up, false = scroll down
  529.   P2:
  530.   Returns: 
  531.  
  532. HORIZSCROLLPAGE        horizontal scroll of text box 1 page
  533.   Sent:    to scroll a text window horizontally one page
  534.   P1:      true = scroll left, false = scroll right
  535.   P2:
  536.   Returns: 
  537.  
  538. SCROLLDOC             document scroll of text box
  539.   Sent:    to scroll a text window to beginning/end of document
  540.   P1:      true = scroll to beginning, false = scroll to end
  541.   P2:
  542.   Returns: 
  543.  
  544. Edit Box Messages  
  545.  
  546. GETTEXT             get text from an edit box      
  547.   Sent:    Get the line of text from a single-line editbox
  548.   P1:      address of receiving buffer
  549.   P2:      max length to copy
  550.   Returns: 
  551.  
  552. SETTEXTLENGTH        set maximum text length in an edit box      
  553.   Sent:    to set the maximum number of characters that an editbox
  554.            may hold in its buffer.
  555.   P1:      maximum character count
  556.   P2:      
  557.   Returns: 
  558.  
  559.  
  560. Application Window Messages
  561.  
  562. ADDSTATUS               write text to the status bar
  563.   Sent:    to write to or clear status bar text area
  564.   P1:      address of text (null-terminated string) or NULL to clear
  565.   P2:      
  566.   Returns: 
  567.  
  568. List Box Messages  
  569.  
  570. LB_SELECTION               list box selection
  571.   Sent:    sent by list box to self and to parent (if parent is not
  572.            a simple LISTBOX window) when user moves to an entry on 
  573.            the list box.
  574.   P1:      selection number: 0, 1, ...
  575.   P2:      if multi-line selection listbox, shift status mask
  576.            if not, true = selection was same as choice (e.g. mouse)
  577.   Returns: 
  578.  
  579. LB_CHOOSE               list box choice        
  580.   Sent:    sent to parent of list box when user chooses an item 
  581.            from the list box
  582.   P1:      selection number: 0, 1, ...
  583.   P2:      
  584.   Returns: 
  585.  
  586. LB_CURRENTSELECTION    return the current selection   
  587.   Sent:    To get the current selection number (where the listbox
  588.            cursor is positioned)
  589.   P1:      
  590.   P2:      
  591.   Returns: selection number: 0, 1, ...
  592.  
  593. LB_GETTEXT             return the text of selection   
  594.   Sent:    To get a copy of the text at a specified line
  595.   P1:      Address of string to receive copy of text
  596.   P2:      Line number: 0, 1, ...
  597.   Returns: 
  598.  
  599. LB_SETSELECTION        sets the listbox selection     
  600.   Sent:    To change where the listbox cursor points
  601.   P1:      Line number: 0, 1, ...
  602.   P2:      
  603.   Returns: 
  604.  
  605. Picture Box Messages
  606.  
  607. DRAWVECTOR           Draws a vector
  608.   Sent:    To draw a vector in the window's client area
  609.   P1:      address of RECT that describes the vector relative to the
  610.            window's client area
  611.            (either lf = rt [vertical vector] or tp = bt [horizontal
  612.            vector])
  613.   P2:      
  614.   Returns: 
  615.  
  616. DRAWBOX             Draws a box
  617.   Sent:    To draw a box in the window's client area
  618.   P1:      address of RECT that describes the box relative to the
  619.            window's client area
  620.   P2:      
  621.   Returns: 
  622.  
  623. DRAWBAR             Draws a barchart bar
  624.   Sent:    To draw a bar in the window's client area
  625.   P1:      address of RECT that describes the bar relative to the
  626.            window's client area
  627.            (either lf = rt [vertical vector] or tp = bt [horizontal
  628.            vector])
  629.   P2:      one of these: SOLIDBAR, HEAVYBAR, CROSSBAR, LIGHTBAR
  630.              (4 different bar textures)
  631.   Returns: 
  632.  
  633. =====================================================
  634.  
  635. API Functions & Macros:
  636.  
  637. These are functions and macros defined for use by applications
  638. programs. There are many others defined in the header files. These
  639. others are for D-Flat to use, and programmers need not be concerned
  640. about them except as an expression of their curiosity about how
  641. D-Flat works.
  642.  
  643.  
  644. (Note: These specifications are not in any orderly sequence yet.)
  645.  
  646.  
  647. -------------------------------------------------------------------
  648. void init_messages(void)
  649.  
  650. Call this function first to initialize message processing. Continue
  651. only if the function returns a true value. Otherwise, terminate the
  652. processing of your program. A false return occurs from a longjmp that
  653. is executed when D-Flat attempts to allocate memory that is not
  654. available.
  655.  
  656. -------------------------------------------------------------------
  657. WINDOW CreateWindow(
  658.     CLASS class,              /* class of this window       */
  659.     char *ttl,                /* title or NULL              */
  660.     int left, int top,        /* upper left coordinates     */
  661.     int height, int width,    /* dimensions                 */
  662.     void *extension,          /* pointer to additional data */
  663.     WINDOW parent,            /* parent of this window      */
  664.     int (*wndproc)(struct window *,MESSAGE,PARAM,PARAM),
  665.     int attrib)               /* window attribute           */
  666.  
  667. This function creates a window. It returns the WINDOW handle that
  668. messages and functions use to identify the window. If you specify
  669. NULL for the parent, the APPLICATION window becomes the parent.
  670.  
  671. -------------------------------------------------------------------
  672. void PostMessage(WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
  673.  
  674. Post a message to a window. The window will receive the message in
  675. turn during the message-dispatching loop.
  676.  
  677. -------------------------------------------------------------------
  678. int SendMessage(WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
  679.  
  680. Send a message to a window. The window will receive the message
  681. immediately. Control returns to the sender after the window has
  682. processed the message. The window can return an integer value.
  683.  
  684. This function can send system messages to NULL. System messages
  685. are ones that D-Flat processes without regard to a particular window.
  686. -------------------------------------------------------------------
  687. int dispatch_message(void)
  688.  
  689. The message dispatching loop. After opening the first window (usually
  690. the applications window), continue to call this function until it
  691. returns a FALSE value.
  692. -------------------------------------------------------------------
  693. void handshake(void)
  694.  
  695. This function dispatches messages without allowing any keyboard or
  696. click events to pass through. You use it to allow the clock to run or
  697. the watch icon to move during a lengthy process without allowing
  698. anything to execute a command that might interfere with what your
  699. program is doing.
  700.  
  701. -------------------------------------------------------------------
  702. int TestCriticalError(void)
  703.  
  704. -------------------------------------------------------------------
  705. int DefaultWndProc(WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
  706.  
  707. Call this from a window-processing function to chain to the default
  708. window-processing function for the window's class.
  709.  
  710. -------------------------------------------------------------------
  711. int BaseWndProc(CLASS class, WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
  712.  
  713. Call this from the window-processing function of a derived window
  714. class to chain to the window-processing function of the base window's
  715. class.
  716.  
  717. -------------------------------------------------------------------
  718. int WindowHeight(WINDOW wnd)
  719. int WindowWidth(WINDOW wnd)
  720.  
  721. These functions return the window's height and width.
  722. -------------------------------------------------------------------
  723. int ClientWidth(WINDOW wnd)
  724. int ClientHeight(WINDOW wnd)
  725.  
  726. These functions return the height and width of the window's client
  727. area.
  728.  
  729. -------------------------------------------------------------------
  730. int GetTop(WINDOW wnd)
  731. int GetBottom(WINDOW wnd)
  732. int GetLeft(WINDOW wnd)
  733. int GetRight(WINDOW wnd)
  734.  
  735. These functions return the screen coordinates of the four corners of
  736. the window.
  737.  
  738. -------------------------------------------------------------------
  739. int GetClientTop(WINDOW wnd)
  740. int GetClientBottom(WINDOW wnd)
  741. int GetClientLeft(WINDOW wnd)
  742. int GetClientRight(WINDOW wnd)
  743.  
  744. These functions return the screen coordinates of the four corners of
  745. the window's client area.
  746.  
  747. -------------------------------------------------------------------
  748. WINDOW GetParent(WINDOW wnd)
  749.  
  750. Returns the parent of the window or NULL if the window has no
  751. parent.
  752.  
  753. -------------------------------------------------------------------
  754. int CharInView(WINDOW wnd, int x, int y)
  755.  
  756. Returns true if the x/y character position, relative to the window,
  757. is in view (not clipped at the border of a parent window or the
  758. screen.
  759.  
  760. -------------------------------------------------------------------
  761. int TopBorderAdj(WINDOW wnd)
  762.  
  763. Returns the value to add to a y coordinate of the window's client
  764. area to make it relative to the window top.
  765.  
  766. -------------------------------------------------------------------
  767. int BorderAdj(WINDOW wnd)
  768.  
  769. Returns the value to add to an x coordinate relative to the window's
  770. client area to make it relative to the window's left edge.
  771.  
  772. -------------------------------------------------------------------
  773. char *GetTitle(WINDOW wnd)
  774.  
  775. Returns the address of a window's title, or NULL if the window has no
  776. title.
  777.  
  778. -------------------------------------------------------------------
  779. void AddTitle(WINDOW wnd, char *title)
  780.  
  781. Adds or changes the title to an existing window.
  782.  
  783. -------------------------------------------------------------------
  784. CLASS GetClass(WINDOW wnd)
  785.  
  786. Returns the class of the window.
  787.  
  788. -------------------------------------------------------------------
  789. int GetAttribute(WINDOW wnd)
  790.  
  791. Returns the attribute word of a window.
  792.  
  793. -------------------------------------------------------------------
  794. void AddAttribute(WINDOW wnd, int attrib)
  795.  
  796. Adds one or more attributes to a window. OR the attribute values
  797. together.
  798.  
  799. -------------------------------------------------------------------
  800. void ClearAttribute(WINDOW wnd, int attrib)
  801.  
  802. Clears one or more attributes from a window. OR the attribute values
  803. together.
  804.  
  805. -------------------------------------------------------------------
  806. int TestAttribute(WINDOW wnd, int attrib)
  807.  
  808. Tests one or more attributes in a window. Returns true if any of them
  809. are set. OR the attribute values together.
  810.  
  811. -------------------------------------------------------------------
  812. int isVisible(WINDOW wnd)
  813.  
  814. Returns true if the window is visible.
  815.  
  816. -------------------------------------------------------------------
  817. char *GetText(WINDOW wnd)
  818.  
  819. Returns the address of the text buffer for a TEXTBOX or derived
  820. window class.
  821.  
  822. -------------------------------------------------------------------
  823. int GetTextLines(WINDOW wnd)
  824.  
  825. Returns the number of text lines in a TEXTBOX or derived
  826. window class.
  827.  
  828. -------------------------------------------------------------------
  829. char *TextLine(WINDOW wnd, int line)
  830.  
  831. Returns the address of a specified line of text (0, 1, ...) in a
  832. TEXTBOX or derived class.
  833.  
  834. -------------------------------------------------------------------
  835. WINDOW inWindow(WINDOW wnd, int x, int y)
  836.  
  837. Returns the WINDOW handle of the window that x/y are in or NULL if
  838. x/y is outside of any window. Send NULL for wnd to search all
  839. windows. Send a window handle to search only that window's children.
  840.  
  841. -------------------------------------------------------------------
  842. int isActive(MENU *mnu, int command)
  843.  
  844. Returns true if the command (commands.h) on the menu is active
  845. (enabled).
  846.  
  847. -------------------------------------------------------------------
  848. char *GetCommandText(MBAR *mn, int cmd)
  849.  
  850. Returns the address of a menu command's title text.
  851.  
  852. -------------------------------------------------------------------
  853. void ActivateCommand(MENU *mnu, int command)
  854. void DeactivateCommand(MENU *mnu, int command)
  855.  
  856. Activate (enable) or deactivate (disable) a command (commands.h) on a
  857. menu.
  858.  
  859. -------------------------------------------------------------------
  860. int GetCommandToggle(MENU *mnu, int command)
  861. void SetCommandToggle(MENU *mnu, int command)
  862. void ClearCommandToggle(MENU *mnu, int command)
  863. void InvertCommandToggle(MENU *mnu, int command)
  864.  
  865. Some menu commands are toggles rather than executors of processes. 
  866. Examples are the Insert and Word wrap commands on the Options menu.
  867. These functions get, set, clear, and invert the toggle setting for a
  868. specified command on a specified menu.
  869.  
  870. -------------------------------------------------------------------
  871. int ItemSelected(WINDOW wnd, int line)
  872.  
  873. This function returns true if the specified item (0, 1, ...) on a
  874. multiple-line selection listbox is selected.
  875.  
  876. -------------------------------------------------------------------
  877. int DialogBox(
  878.   WINDOW wnd,        /* parent window of the dialog box        */
  879.   DBOX *db,          /* address of dialog box definition array */
  880.   int Modal,         /* trus if it is a modal dialog box       */
  881.   int (*wndproc)(struct window *, MESSAGE, PARAM, PARAM)
  882.                      /* the window processing function or NULL */
  883. )
  884.  
  885. This function executes a dialog box. If it is a modal dialog box, the
  886. function does not return until the user completes the dialog box. The
  887. return value will be true if the user has selected OK and false if
  888. the user has selected Cancel on the dialog box. If the dialog box is
  889. modeless, the function returns immediately, and the user can select
  890. other things from the screen while the dialog box is still active.
  891.  
  892. -------------------------------------------------------------------
  893. WINDOW ControlWindow(DBOX *db, enum commands cmd)
  894.  
  895. This function returns the WINDOW handle of the control specified by
  896. the cmd parameter.
  897. -------------------------------------------------------------------
  898. int DlgOpenFile(char *filespec, char *filename)
  899.  
  900. This function operates the Open File dialog box. The filespec pointer
  901. points to a default file path specification that the dialog box uses
  902. to display files, for example, *.DOC. If the function returns true,
  903. the space pointed to by the filename pointer will contain the path
  904. and filename selected by the user to be read.
  905.  
  906. -------------------------------------------------------------------
  907. int DlgSaveAs(char *filename)
  908.  
  909. This function operates the Save As dialog box. If the function returns
  910. true, the space pointed to by the filename pointer will contain the
  911. path and filename selected by the user where the file will be
  912. written.
  913.  
  914. -------------------------------------------------------------------
  915. void MessageBox(char *title, char *message)
  916. void CancelBox(wnd, char *message)
  917. void ErrorMessage(char *message)
  918. int TestErrorMessage(char *message)
  919. int YesNoBox(char *question)
  920. WINDOW MomentaryMessage(char *message)
  921.  
  922. These functions display generic message boxes. The message text is
  923. one null-terminated string with newlines (\n) to indicate where lines
  924. are to be broken. The size of the boxes adjusts to the width of the
  925. longest line and the number of lines of text. A message may have no
  926. more lines of text than will fit into the largest window that the
  927. screen can display. You must account for the window's border's and
  928. the presence at the bottom of one or more command buttons.
  929.  
  930. The MessageBox function displays a message in a window with a title
  931. provided by the caller. The window contains the message and an OK
  932. command button.
  933.  
  934. The CancelBox function displays a message in a window with a
  935. "Wait..." title. The window contains the message and a Cancel command
  936. button. If the user presses the Cancel button before the program
  937. closes the window, the COMMAND, ID_CANCEL message is sent to the
  938. parent window.
  939.  
  940. The ErrorMessage function displays the message in an error box window
  941. with an OK command button.
  942.  
  943. The TestErrorMessage function is an error message with OK and Cancel
  944. command buttons. The function returns true if the user selects OK or
  945. presses Enter and false if the user selects Cancel or presses Esc.
  946.  
  947. The YesNoBox function displays the message with Yes and No command
  948. buttons. The function returns true if the user selects Yes or
  949. presses Enter and false if the user selects No or presses Esc.
  950.  
  951. The MomentaryMessage function displays a message box and returns its
  952. WINDOW handle. The caller must close the window. The purpose of this
  953. function is to allow you to display a message while some time
  954. consuming process is underway and then erase the message after the
  955. process is done but without any action required from the user.
  956.  
  957. -------------------------------------------------------------------
  958. int InputBox(WINDOW wnd, char *ttl, char *msg, char *text, int len)
  959.  
  960. This function executes a generic one-line user input dialog box. The
  961. wnd parameter is the parent window of the dialog box. The ttl
  962. parameter points to a title string for the dialog box. The msg
  963. parameter points to a prompting text message. The text parameter
  964. points to the string that will receive the user's input. The len
  965. parameter is the length of the input string not including the null
  966. terminator.
  967.  
  968. The function returns a true value if the user chooses the OK command
  969. button and false if the user selects Cancel.
  970.  
  971. -------------------------------------------------------------------
  972. WINDOW SliderBox(int len, char *ttl, char *msg)
  973.  
  974. This function displays a dialog box with the specified title and
  975. message, a slider bar of the specified length, and a Cancel button.
  976. The slider bar displays a percent value.
  977.  
  978. You use the slider box to display feedback to the user when the
  979. program is doing a time-consuming task, such as printing a file.
  980. Periodically, through your process, you send a PAINT message to the
  981. window handle that the SliderBox function returns. The second
  982. parameter is the new percent value. When you have sent 100, the
  983. slider dialog box closes itself. If the user chooses the Cancel
  984. command on the dialog box, your next PAINT message returns FALSE.
  985. Otherwise it returns TRUE.
  986.  
  987. -------------------------------------------------------------------
  988. int RadioButtonSetting(DBOX *db, enum commands cmd)
  989.  
  990. This function returns true if the specified command on the specified
  991. dialog box is a pressed radio button.
  992.  
  993. -------------------------------------------------------------------
  994. void EnableButton(DBOX *db, enum commands cmd)
  995.  
  996. This function enables a command button on a dialog box. command
  997. buttons are initially enabled when the dialog box is first opened.
  998.  
  999. -------------------------------------------------------------------
  1000. void DisableButton(DBOX *db, enum commands cmd)
  1001.  
  1002. This function disables a command button on a dialog box. command
  1003. buttons are initially enabled when the dialog box is first opened.
  1004.  
  1005. -------------------------------------------------------------------
  1006. void PushRadioButton(DBOX *db, enum commands cmd)
  1007.  
  1008. This function presses the specified radio button command on the
  1009. specified dialog box.
  1010.  
  1011. -------------------------------------------------------------------
  1012. void PutItemText(WINDOW wnd, enum commands cmd, char *text)
  1013.  
  1014. This function appends a line of text to a TEXT, TEXTBOX, EDITBOX,
  1015. LISTBOX, SPINBUTTON, or COMBOBOX control window in a dialog box. The
  1016. wnd parameter is the WINDOW handle of the dialog box. The cmd
  1017. parameter specifies the command associated with the control item. The
  1018. text parameter points to the text to be added. The control window
  1019. makes its own copy of the text, so the caller's copy can go out of
  1020. scope.  If the control window is a COMBOBOX, TEXTBOX, or EDITBOX
  1021. window, you must send a PAINT message to the control window so that
  1022. the new text will display.
  1023.  
  1024. You must call this function while the dialog box is active. That
  1025. means that if the dialog box is modal, you must call this function
  1026. from within a custom window processing function that you supply when
  1027. you call DialogBox.
  1028.  
  1029. -------------------------------------------------------------------
  1030. void PutComboListText(WINDOW wnd, enum commands cmd, char *text)
  1031.  
  1032. This function appends a line of text to the LISTBOX of a COMBOBOX
  1033. control window in a dialog box. The wnd parameter is the WINDOW
  1034. handle of the dialog box. The cmd parameter specifies the command
  1035. associated with the combo box. The text parameter points to the
  1036. text to be added. The control window makes its own copy of the text,
  1037. so the caller's copy can go out of scope.
  1038.  
  1039. You must call this function while the dialog box is active. That
  1040. means that if the dialog box is modal, you must call this function
  1041. from within a custom window processing function that you supply when
  1042. you call DialogBox.
  1043.  
  1044. -------------------------------------------------------------------
  1045. void GetItemText(WINDOW wnd, enum commands cmd, char *text, int length)
  1046.  
  1047. This function copies the text from a TEXT, TEXTBOX, COMBOBOX, or
  1048. EDITBOX control window in a dialog box. The wnd parameter is the
  1049. WINDOW handle of the dialog box. The cmd parameter specifies the
  1050. command associated with the control item. The text parameter points
  1051. to the caller's buffer where the text will be copied. The length
  1052. parameter specifies the maximum number of characters to copy.
  1053.  
  1054. You must call this function while the dialog box is active. That
  1055. means that if the dialog box is modal, you must call this function
  1056. from within a custom window processing function that you supply when
  1057. you call DialogBox.
  1058.  
  1059. -------------------------------------------------------------------
  1060. char *GetEditBoxText(DBOX *db, enum commands cmd)
  1061.  
  1062. This function returns a pointer to the text associated with an
  1063. editbox control in a dialog box. You can call it after the dialog box
  1064. has completed processing. The buffer is on the heap. Do not free it.
  1065. Instead, call SetEditBoxText with a NULL pointer.
  1066.  
  1067. If the text has not changed since it was initialized, this function
  1068. returns NULL.
  1069.  
  1070. -------------------------------------------------------------------
  1071. char *GetComboBoxText(DBOX *db, enum commands cmd)
  1072.  
  1073. This function returns a pointer to the text associated with an
  1074. combo box control in a dialog box. You can call it after the dialog box
  1075. has completed processing. The buffer is on the heap. Do not free it.
  1076. Instead, call SetEditBoxText with a NULL pointer.
  1077.  
  1078. If the text has not changed since it was initialized, this function
  1079. returns NULL.
  1080.  
  1081. -------------------------------------------------------------------
  1082. void SetEditBoxText(DBOX *db, enum commands cmd, char *text)
  1083.  
  1084. This function sets the text of a dialog box editbox. You can call
  1085. this function before or while the dialog box is open. The dialog box
  1086. makes it own copy on the heap, so your text can go out of scope.
  1087.  
  1088. -------------------------------------------------------------------
  1089. void SetComboBoxText(DBOX *db, enum commands cmd, char *text)
  1090.  
  1091. This function sets the text of a dialog box combo box. You can call
  1092. this function before or while the dialog box is open. The dialog box
  1093. makes it own copy on the heap, so your text can go out of scope.
  1094.  
  1095. -------------------------------------------------------------------
  1096. char *GetDlgText(DBOX *db, enum commands cmd, char *text)
  1097.  
  1098. Similar to GetEditBoxText except that it works with text controls.
  1099.  
  1100. -------------------------------------------------------------------
  1101. char *SetDlgText(DBOX *db, enum commands cmd, char *text)
  1102.  
  1103. Similar to SetEditBoxText except that it works with text controls.
  1104.  
  1105. -------------------------------------------------------------------
  1106. char *GetDlgTextBox(DBOX *db, enum commands cmd, char *text)
  1107.  
  1108. Similar to GetEditBoxText except that it works with textbox controls.
  1109.  
  1110. -------------------------------------------------------------------
  1111. char *SetDlgTextBox(DBOX *db, enum commands cmd, char *text)
  1112.  
  1113. Similar to SetEditBoxText except that it works with textbox controls.
  1114.  
  1115. -------------------------------------------------------------------
  1116. void SetCheckBox(DBOX *db, enum commands cmd)
  1117. void ClearCheckBox(DBOX *db, enum commands cmd)
  1118. int CheckBoxSetting(DBOX *db, enum commands cmd)
  1119.  
  1120. These functions set, clear, and test the setting of a specified check
  1121. box control item on a dialog box.
  1122.  
  1123. -------------------------------------------------------------------
  1124. void SetDlgTitle(DBOX *db, char *ttl)
  1125.  
  1126. This function changes the specified dialog box's title.
  1127. -------------------------------------------------------------------
  1128. void LoadHelpFile(char *expath);
  1129.  
  1130. This function loads the help file named by the DFLAT_APPLICATION
  1131. global constant with the .HLP file extension. The expath parameter
  1132. points to the DOS path where the file can be found.
  1133.  
  1134. Call this function at the beginning of an application program.
  1135.  
  1136. -------------------------------------------------------------------
  1137. void UnLoadHelpFile(void);
  1138.  
  1139. Call this function at the end of a D-Flat application to free the
  1140. memory used by a help file.
  1141.  
  1142. -------------------------------------------------------------------
  1143. void SearchText(WINDOW wnd)
  1144.  
  1145. Opens a dialog box for the user to enter a search string. Searches
  1146. the wnd TEXTBOX for a match on the string.
  1147.  
  1148. -------------------------------------------------------------------
  1149. void ReplaceText(WINDOW wnd)
  1150.  
  1151. Opens a dialog box for the user to enter search and replacement
  1152. strings. Searches the wnd TEXTBOX for a match on the string and
  1153. replaces it if found. The dialog box includes an option to replace
  1154. all matches.
  1155.  
  1156. -------------------------------------------------------------------
  1157. void SearchNext(WINDOW wnd)
  1158.  
  1159. Assumes that a previous SearchText call has found a match. Searches
  1160. for the next match of the same string in the specified EDITBOX
  1161. window.
  1162.  
  1163. -------------------------------------------------------------------
  1164. void WriteTextLine(WINDOW wnd, RECT *rcc, int y, int reverse)
  1165.  
  1166. This function displays a text line from a TEXTBOX or derived window
  1167. class. The text has already been added to the window with ADDTEXT,
  1168. etc. The y parameter specifies which line (0, 1, ...) relative to the
  1169. window's text buffer to display. If the specified line is not in
  1170. view, the function does nothing. If the reverse parameter is true,
  1171. the line displays in the reverse-video colors of the window. The rcc
  1172. RECT pointer is usually NULL for applications calls. It points to a
  1173. rectangle relative to the window outside of which displays will not
  1174. occur. 
  1175.  
  1176. -------------------------------------------------------------------
  1177. void PutWindowLine(WINDOW wnd, void *s, int x, int y)
  1178.  
  1179. This function writes a line of text to a window. The x and y
  1180. coordinates point to the first character in the window's client area
  1181. where the line is to be written. The text must be null-terminated.
  1182. This function clips the line if it goes beyond the window or the
  1183. screen. The function clips the line if it goes outside the borders of
  1184. the window's parent. If other windows overlap the target window, the
  1185. text is clipped. Do not use negative values in x or y.
  1186.  
  1187. You can assign color values to the global variables foreground and
  1188. background to affect the color of the line's display.
  1189.  
  1190. -------------------------------------------------------------------
  1191. void PutWindowChar(WINDOW wnd, int c, int x, int y)
  1192.  
  1193. This function writes the character c to a window. The x and y
  1194. coordinates are relative to the window's client area.
  1195.  
  1196. The function performs clipping. If the character is beyond the
  1197. window's or the screen's borders it is not written. If the window
  1198. does not have the NOCLIP attribute, the character is not written if
  1199. its coordinates are beyond the margins of its parent window (if the
  1200. window has a parent). If other windows overlap the target window, the
  1201. text is clipped. Do not use negative values in x or y.
  1202.  
  1203. You can assign color values to the global variables foreground and
  1204. background to affect the color of the character's display.
  1205.  
  1206. -------------------------------------------------------------------
  1207. void DrawVector(WINDOW wnd, int x, int y, int len, int hv)
  1208.  
  1209. Draw a horizontal vector in a picture box. x and y are character
  1210. coordinates relative to the starting position of the vector. len is
  1211. the length. hv is TRUE for a horizontal vector and FALSE for a
  1212. vertical vector. Sends a DRAWVECTOR message to the window.
  1213.  
  1214. Send a PAINT message to the window to display the vectors.
  1215.  
  1216. -------------------------------------------------------------------
  1217. void DrawBox(WINDOW wnd, int x, int y, int ht, int wd)
  1218.  
  1219. Draw a box in a picture box. x and y are character coordinates
  1220. relative to the upper left corner of the box. ht and wd are the
  1221. height and width of the box. Sends a DRAWBOX message to the window.
  1222.  
  1223. Send a PAINT message to the window to display the box.
  1224.  
  1225. -------------------------------------------------------------------
  1226. void DrawBar(WINDOW wnd, enum VectTypes vt, int x, int y, int len, int hv)
  1227.  
  1228. Draw a graph bar in a picture box. vt is one of the following values
  1229. to specify the character box used to display the bar: SOLIDBAR,
  1230. HEAVYBAR, CROSSBAR, LIGHTBAR. x and y are character coordinates
  1231. relative to the starting position of the bar. len is the length. hv
  1232. is TRUE for a horizontal bar and FALSE for a vertical bar. Sends a
  1233. DRAWBAR message to the window.
  1234.  
  1235. Send a PAINT message to the window to display the bars.
  1236.  
  1237. -------------------------------------------------------------------
  1238. void WindowClientColor(WINDOW wnd, int fg, int bg)
  1239.  
  1240. Changes the window client space's foreground and background colors.
  1241. -------------------------------------------------------------------
  1242. void WindowReverseColor(WINDOW wnd, int fg, int bg)
  1243.  
  1244. Changes the window's foreground and background reverse colors, which
  1245. are used to display such things as selected text blocks.
  1246. -------------------------------------------------------------------
  1247. void WindowFrameColor(WINDOW wnd, int fg, int bg)
  1248.  
  1249. Changes the window's foreground and background frame colors.
  1250. -------------------------------------------------------------------
  1251. void WindowHighlightColor(WINDOW wnd, int fg, int bg)
  1252.  
  1253. Changes the window's foreground and background highlight colors,
  1254. which are used to display highlighted items such as menu selector
  1255. bars.
  1256. -------------------------------------------------------------------
  1257. void MarkTextBlock(WINDOW wnd, int BegLine, int BegCol,
  1258.                                int EndLine, int EndCol)
  1259.  
  1260. Marks a block in the specified TEXTBOX window.
  1261.  
  1262. -------------------------------------------------------------------
  1263. void ClearTextBlock(WINDOW wnd)
  1264.  
  1265. Unmarks a marked block in the specified TEXTBOX window.
  1266.  
  1267. -------------------------------------------------------------------
  1268. void CopyToClipboard(WINDOW wnd)
  1269.  
  1270. Copies the marked block from the WINDOW into the Clipboard.
  1271.  
  1272. -------------------------------------------------------------------
  1273. void CopyTextToClipboard(char *string)
  1274.  
  1275. Copies a null-terminated string into the Clipboard.
  1276.  
  1277. -------------------------------------------------------------------
  1278. void PasteFromClipboard(WINDOW wnd)
  1279.  
  1280. Pastes the Clipboard's contents into the specified EDITBOX window at
  1281. the current cursor location.
  1282.  
  1283. -------------------------------------------------------------------
  1284. void ClearClipboard(void)
  1285.  
  1286. Clears the clipboard and frees the memory allocated for it. Called by
  1287. D-Flat when message processing terminates. 
  1288.  
  1289. -------------------------------------------------------------------
  1290. WINDOW WatchIcon(void)
  1291.  
  1292. Displays a wristwatch icon on the screen. The icon has control of the
  1293. keyboard and mouse. You must send the CLOSE_WINDOW message to the
  1294. WINDOW handle that WatchIcon returns to get rid of the icon.
  1295.  
  1296. Use this icon to tell the user to please stand by during long
  1297. processes. Call handshake frequently during these processes to
  1298. update the date display in the status bar and to allow the watch icon
  1299. to move when the user moves the mouse.
  1300.  
  1301. -------------------------------------------------------------------
  1302. Configurable Items
  1303.  
  1304. Global Symbol File      Value Description
  1305. ------------- --------- ----- ---------------------------------------
  1306. MAXMESSAGES   DFLAT.H    50   Maximum D-Flat messages queued
  1307. MAXCONTROLS   DIALBOX.H  26   Maximum Controls on a dialog box
  1308. MAXRADIOS     DIALBOX.H  20   Maximum radio buttons in a group
  1309. MAXSAVES      SYSTEM.H   50   Maximum cursor saves
  1310. MAXPULLDOWNS  MENU.H     15   Maximum number of pull-down menus on
  1311.                               a menu bar (including cascading menus)
  1312. MAXSELECTIONS MENU.H     15   Maximum number of selections on 
  1313.                               a pull-down menu (includes separators)
  1314. MAXCASCADES   MENU.H      3   Maximum nesting level of cascaded menus
  1315. MAXTEXTLEN    DFLAT.H 65000   Maximum text buffer
  1316. EDITLEN       DFLAT.H  1024   Starting length for multiline EDITBOX
  1317. ENTRYLEN      DFLAT.H   256   Starting length for single-line EDITBOX
  1318. GROWLENGTH    DFLAT.H    64   EDITBOX buffers grow by this much
  1319.  
  1320.